package com.leenmvc.core.config;

import com.leenmvc.core.config.filter.GlobalFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean globalFilter() {
        FilterRegistrationBean bean = new FilterRegistrationBean();
        bean.setFilter(new GlobalFilter());
        bean.addUrlPatterns("/*");
        return bean;
    }
}
